package com.cckj.common.event;


import lombok.extern.slf4j.Slf4j;
import org.springframework.context.event.EventListener;
import org.springframework.scheduling.annotation.Async;
import org.springframework.stereotype.Component;

/**
  * @Description //TODO 事件监听处理
  * @Author wjq
  * @time: 2020/11/7 11:40
  */
@Slf4j
@Component
public class BusinessEventListener {

    @Async
    @EventListener(BusinessEvent.class)
    public void handleCustomEvent(BusinessEvent event) {
        //监听 BusinessEvent事件
        log.info("监听到BusinessEvent事件，消息为：{}", event.getMsg());
    }
}
